rem 效率太低
@echo off 
set source_dir=D:\mvn_repository\com\allinfinance\aps
SETLOCAL ENABLEDELAYEDEXPANSION
for /R %source_dir% %%i in (*) do (

    set dirr=%%~dpi
    set filename=%%~nxi
	set folder=!dirr:~,-1!
	call :delfile !folder! !filename!


)
goto :eof
:delfile
set foldername=%~nx1
echo %2 | findstr "%foldername%">nul && echo %2
